import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    type_id: 0,
    activeIndex: window.localStorage.getItem("listPath") || 'home',
    isAddCount: false,
    web_count: 0
  },
  mutations: {
    changeTypeId(state, pload) {
      state.type_id = pload.id;
    },
    changeWebCount(state) {
      state.isAddCount = true
    },
    alterWebCount(state, pload) {
      state.web_count = pload;
    }
  },
  actions: {
  },
  modules: {
  }
})
